
from PIL import Image,ImageDraw,ImageFont



txt = '1'
font = ImageFont.truetype('simsun.ttc',21)
im = Image.new("RGBA",(18,16),(255,255,255))
draw = ImageDraw.Draw(im)
draw.text( (0,-3), txt, font=font,align='center',fill=(0,0,0))
#draw.text( (0,50), unicode(txt,'UTF-8'), font=font)
del draw
im.show()